API Gateway Cognito User Pool Authorizer | Serverless Security

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии • 43

  • @andriys5772
    @andriys5772 3 года назад +1

    13:35 - yes "custom_header" is supper important. Thank you!

  • @alejandro950417
    @alejandro950417 3 года назад +1

    thanks for this video, i spent days having issues with API Gateway with cognito authorizer because of the AddDefaultAuthorizerToCorsPreflight. Thank you very much!

  • @codenjourney6656
    @codenjourney6656 4 года назад +1

    Awesome. I tried this today but you have explained it in a very easy to underatand way. Thanks

  • @md.amaanuddinparvez4733
    @md.amaanuddinparvez4733 5 лет назад +2

    Can you also make a tutorial on how to make api call for unauthorised user with cognito authorization

  • @patrickmullen5167
    @patrickmullen5167 3 года назад +1

    very informative. Thank you!

  • @petetandon1164
    @petetandon1164 4 года назад +2

    1 - Thank you for this video!
    2 - Could you link us the blog post mentioned at ~8:25 ?

  • @michaelakin766
    @michaelakin766 Год назад

    Hi, I like your video, but I have a few questions.
    Why did you use Id token instead of access token? I have read we are not supposed to use the Id token to authorize a call, and
    I wish you would go a litter further and show how to identify the logged in user in the lambda.

  • @gustavocardonaramirez1196
    @gustavocardonaramirez1196 5 лет назад +1

    Hello Marcia, thank very much for your videos. Would you create this video using serveless framework? are you continue working with serverless framework? or now you are using only SAM?

    • @foobar_codes
      @foobar_codes  4 года назад

      for serverless framewokr there is a video :D ruclips.net/video/4QwWY9Fg4p4/видео.html
      i will keep doing videos of both

  • @renjuradhakrishnan2514
    @renjuradhakrishnan2514 4 года назад +1

    Could you please specify the advantage of cognito user pool authorizer over IAM authorizer?

    • @codingexpedition4625
      @codingexpedition4625 4 года назад

      A user pool authorizer is simpler than using IAM authorizers. However it is also less fine grained.
      Using a IAM authorizer you can make a difference between admin and user. Or you can give access to specific resources of your API.
      When using user pool authorizer we just check if the client has a valid token that was issued by the user pool

  • @effearts44
    @effearts44 2 года назад

    Hey @FooBar this was an informative video. But you keep saying in most of your videos that you will share the links in the description, but when I check the description section I don't see any link!!!

    • @foobar_codes
      @foobar_codes  2 года назад +1

      Its there.

    • @effearts44
      @effearts44 2 года назад

      @@foobar_codes My bad! I found them. I was checking below the video canvas. Thanks!

  • @letscode3920
    @letscode3920 2 года назад

    Thanks Marcia! I just have a question. How can I do if I have public endpoints under "/public/xxxx" paths(does not require authentication), and protected endpoints under "/auth/xxx" path (Auth required), I'm using SAM Api GW + lambda with Cognito Authorizer. Is that possible? Can I put that condition in some place of my SAM definition?

  • @SK-cp5eh
    @SK-cp5eh 4 года назад +2

    I've been pulling my hair out for the last week to do this. YOU THE BEST

  • @sutapachakraborty1600
    @sutapachakraborty1600 3 года назад

    After 7:42 when I run npm run deploy , I got "Error: Unable to upload artifact ./hello referenced by CodeUri parameter of HelloFunction resource.
    An error occurred (AccessDenied) when calling the PutObject operation: Access Denied---what to do?

  • @bosypuspus
    @bosypuspus 4 года назад +1

    What is the pricing when using the API Gateway features Cognito User Pool Authorizer or lambda authroizer?

    • @foobar_codes
      @foobar_codes  4 года назад

      you can find pricing here. aws.amazon.com/api-gateway/pricing/
      i dont think there is any extra cost by adding authorizers. But if you will be executing a lambda as an authorizer then you need to pay for it.

  • @SchwadoGaming
    @SchwadoGaming 4 года назад +1

    Why are we removing the identity property? What is it good for?

    • @codingexpedition4625
      @codingexpedition4625 4 года назад

      It is used when using an IAM authorizer in one of the previous videos. Then you are exchanging your token for temporary IAM credentials. Therefore you need an identity pool.
      In this case we are using "User Pool authorizer" . Thus we are just checking if the user/client/caller has a valid token which was issued by the user pool.

  • @SuperJavierus
    @SuperJavierus 3 года назад +1

    Do you have a tutorial with alb+cognito,?

    • @foobar_codes
      @foobar_codes  3 года назад

      no :(

    • @SuperJavierus
      @SuperJavierus 3 года назад

      @@foobar_codes no problem, I have to figure out how to authenticate users from a reactjs website, using cognito inside a vpc, I have no internet access or nat gateway, what a mess!

  • @YeisonDev
    @YeisonDev 4 года назад

    Is dangerous see the data that identity user pool id and the client id ?

    • @codingexpedition4625
      @codingexpedition4625 4 года назад

      No, they are supposed to be public. However in this case we have a preSignUpLambda which autoConfirms the user.
      That indeed exposes you to be flooded with fake user registrations.
      I think here the preSignUpLambda is used cause it simplifies things for the demo. This way we do not have to confirm our user by email for example.
      Here you can find a little more info: stackoverflow.com/questions/47833797/are-the-cognito-user-pool-id-and-client-id-sensitive

  • @K3nn3th16
    @K3nn3th16 5 лет назад

    Your videos are always helpful. I need help with setting up my serverless framework for the app integration. How can I set up app client settings using the serverless framework?

    • @codingexpedition4625
      @codingexpedition4625 4 года назад

      This can help you get started: ruclips.net/video/4QwWY9Fg4p4v/видео.html .

  • @spin851
    @spin851 4 года назад +1

    Hi I like the video as well.

  • @codingexpedition4625
    @codingexpedition4625 4 года назад

    What will happen when the token expires? Will the refresh token be used automatically to get a new IdToken or will I have to login again?

    • @andresm9051
      @andresm9051 3 года назад

      Si esta usando solo con usuarios de iam con acceess key y secretkey si lo debes hacer manual en la consola o por medio de sdk, si estas usando cognito con identity pool creará credenciales temporales para ejecutar el recursos, cognito administrará los tokens

  • @manjirikadam3984
    @manjirikadam3984 4 года назад

    Hello Can you make one video on single Sign On using cognito?

    • @manjirikadam3984
      @manjirikadam3984 4 года назад

      Also, please make one video in importing .csv file in userpool

  • @edfrazier
    @edfrazier 4 года назад +1

    This was great but when i click on the "Open Hosted UI" i get am error and i cant figure out why?
    error: TypeError: Cannot read property 'token' of undefined
    AuthClass../node_modules/aws-amplify/lib/Auth/Auth.js.AuthClass.federatedSignIn
    node_modules/aws-amplify/lib/Auth/Auth.js:1318

  • @resourcesaccenture3118
    @resourcesaccenture3118 4 года назад +1

    Is there a version of this tutorial for the serverless framework?

    • @foobar_codes
      @foobar_codes  4 года назад +1

      there is :D ruclips.net/video/4QwWY9Fg4p4/видео.html

  • @reidelgonzalezpaz4079
    @reidelgonzalezpaz4079 4 года назад +3

    nice, pleace, subtitle in spanish or spanish video!!! YOU HAVE ME LIKE!!!

  • @rolecram2
    @rolecram2 4 года назад

    Hi Marcia, Would you agree to marry me?
    Now, can you explain how to authenticate API gateway Websocket using Cognito. The route $connect only accept IAM or Lambda Authorizers, just in case I have to authenticate the user, get the JWT from Cognito and pass it to the Lambda function (in URL or header request). Then the Lambda function has to manually check the token validity and generate the police. It is a mess, but the only way I found it until now. Thanks so much.